﻿<UserControl x:Class="Atlanchim.Crm.Mui.Pages.Emails.PageViewEmail"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="20"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--Entête-->
        <TextBlock Text="Email" Style="{StaticResource Heading2}" />

        <!--Actions-->
        <StackPanel Orientation="Horizontal" Grid.Row="1">
            <mui:ModernButton Content="Modifier"
                          Command="NavigationCommands.GoToPage" CommandParameter="{Binding Path=EditUrl}"
                          IconData="{DynamicResource LmondeilEditButtonPath}" Foreground="{DynamicResource LmondeilEditButtonColor}" />
            <mui:ModernButton Content="Supprimer"
                          Command="ApplicationCommands.Delete" CommandParameter="{Binding}"
                          IconData="{DynamicResource LmondeilDeleteButtonPath}" Foreground="{DynamicResource LmondeilDeleteButtonColor}" 
                          Margin="10, 0"/>
        </StackPanel>


        <!--informations sur l'email-->
        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Rectangle Fill="{DynamicResource ResourceKey=EmailColor}" Grid.RowSpan="2"/>

            <TextBlock Text="Adresse" Grid.Row="0" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Email.Adresse, FallbackValue=[Adresse]}" Grid.Row="0" Grid.Column="2" 
                     VerticalAlignment="Center" Style="{DynamicResource ReadOnlyBextBox}"/>

            <TextBlock Text="Type" Grid.Row="1" Grid.Column="0"
                     VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,3,10,0" />
            <TextBox Text="{Binding Email.Type, FallbackValue=[Type]}" Grid.Row="1" Grid.Column="2" Margin="0,3,0,0" Style="{DynamicResource ReadOnlyBextBox}"/>
        </Grid>

    </Grid>
</UserControl>
